﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TournamentOrganizerWPF
{
    /// <summary>
    /// Interaction logic for ScenarioOverview.xaml
    /// </summary>
    public partial class ScenarioOverview : Window
    {
        private Tournament tournament;

        public ScenarioOverview(Tournament tournament)
        {
            InitializeComponent();
            this.tournament = tournament;
            this.DataContext = tournament;
        }

        private void AddScenario(object sender, RoutedEventArgs e)
        {
            if (!scenarioName.Text.Equals(""))
            {
                tournament.AddScenario(scenarioName.Text);
                scenarioName.Text = "";
            }
        }

        private void ShuffleAndPick(object sender, RoutedEventArgs e)
        {
            tournament.ShuffleAndPick();
        }
    }
}
